<!DOCTYPE html>
<!-- saved from url=(0052)http://getbootstrap.com/docs/4.0/examples/dashboard/ -->
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <title>考试报名管理</title>
    <!-- Bootstrap core CSS -->
    <link href="../static/asserts/css/bootstrap.min.css" th:href="@{/asserts/css/bootstrap.min.css}" rel="stylesheet">
    <script src="http://libs.baidu.com/bootstrap/3.0.3/js/bootstrap.js"></script>
    <link href="http://libs.baidu.com/bootstrap/3.0.3/css/bootstrap.css" rel="stylesheet">
    <!-- Custom styles for this template -->
    <link href="../static/asserts/css/dashboard.css" th:href="@{/asserts/css/dashboard.css}" rel="stylesheet">
    <style type="text/css">
        /* Chart.js */

        @-webkit-keyframes chartjs-render-animation {
            from {
                opacity: 0.99
            }
            to {
                opacity: 1
            }
        }

        @keyframes chartjs-render-animation {
            from {
                opacity: 0.99
            }
            to {
                opacity: 1
            }
        }

        .chartjs-render-monitor {
            -webkit-animation: chartjs-render-animation 0.001s;
            animation: chartjs-render-animation 0.001s;
        }
    </style>
</head>

<body>
<div th:replace="sidbar::#topbar"></div>

<div class="container-fluid">
    <div class="row">
        <div th:replace="sidbar::#sbar"></div>

        <main role="main" class="col-md-9 ml-sm-auto col-lg-10 pt-3 px-4">
            <div class="chartjs-size-monitor"
                 style="position: absolute; left: 0px; top: 0px; right: 0px; bottom: 0px; overflow: hidden; pointer-events: none; visibility: hidden; z-index: -1;">
                <div class="chartjs-size-monitor-expand"
                     style="position:absolute;left:0;top:0;right:0;bottom:0;overflow:hidden;pointer-events:none;visibility:hidden;z-index:-1;">
                    <div style="position:absolute;width:1000000px;height:1000000px;left:0;top:0"></div>
                </div>
                <div class="chartjs-size-monitor-shrink"
                     style="position:absolute;left:0;top:0;right:0;bottom:0;overflow:hidden;pointer-events:none;visibility:hidden;z-index:-1;">
                    <div style="position:absolute;width:200%;height:200%;left:0; top:0"></div>
                </div>
            </div>

            <div class="container-fluid" style="border:gray solid 1px ;background: rgba(153,144,191,0.14)">
                <div style="text-align: center">
                    <h2>考试报名管理</h2>
                    <h2 th:text="${college.getName()!='公共'}?'学院名称:'+${college.getName()}:'公选课'"></h2>
                </div>
                <div class="row">
                    <div class="col-md-5 col-md-offset-4">
                        <form th:action="@{/college/examByCo}" class="form-inline" method="post">
                            学院名称： <select class="col-lg-4" name="id">
                            <option th:each="col:${colleges}" th:value="${col.getId()}"
                                    th:text="${col.getName()}" th:selected="${col.getId()==college.getId()}">1
                            </option>
                        </select>
                            <input type="submit" value="切换学院" class="btn btn-success">
                        </form>
                    </div>
                </div>

                <div id="bodyy"
                     style="font-size: large;text-align: center;border: 1px gray solid;background: #d2ffa9">
                    <!--添加或者删除成功-->

                    <div th:if="${type=='addok'||type=='deleteok'}" class="col-md-12 row"  style="font-size: large;text-align: center;border: 1px gray solid;background: #d2ffa9">
                        <div class="col-md-2">
                            <a th:href="@{/college/examByCo(id=${college.getId()})}"
                               style="width: 150px;height: 300px;font-size: 30px;margin-left:-30px;line-height: 300px"
                               class="btn btn-danger" th:if="${type=='addok'}">&laquo;去删除</a>
                            <a th:href="@{/college/examByCo(id=${college.getId()})}"
                               style="width: 150px;height: 300px;font-size: 30px;margin-left:-30px;line-height: 300px"
                               class="btn btn-danger" th:if="${type=='deleteok'}">&laquo;继续删除</a>
                        </div>

                        <div class="col-md-7">
                            <table class="table table-hover" style="width:300px">
                                <thead>
                                <tr>
                                <h2 th:if="${type=='addok'}">添加成功---那么接下来,你的选择是</h2>
                                <h2 th:if="${type=='deleteok'}">删除成功---那么接下来,你的选择是</h2>
                                </tr>
                                <tr>
                                    <h4 th:if="${type=='addok'}"> 本次添加的考试有：</h4>
                                    <h4 th:if="${type=='deleteok'}"> 本次删除的考试有：</h4>
                                </tr>
                                </thead>
                                <tbody class="col-md-8 col-lg-offset-5 row">
                                <tr th:each="a:${exams}">
                                    <td th:text="${a.getSubjects()}"></td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                        <div class="col-md-offset-1 col-md-2">
                            <a th:href="@{/college/examByCoNo(id=${college.getId()})}" class="btn btn-info"
                               style="width: 150px;height: 300px;font-size: 30px;line-height: 300px;margin-left: 30px"
                               th:if="${type=='deleteok'}">去添加&raquo;</span></a>
                            <a th:href="@{/college/examByCoNo(id=${college.getId()})}" class="btn btn-info"
                               style="width: 150px;height: 300px;font-size: 30px;line-height: 300px;margin-left: 30px"
                               th:if="${type=='addok'}">继续添加&raquo;</span></a>
                        </div>
                    </div>

                    <!--  -------------------------------------------删除 ----------------------------------  -->
                    <div class="row" th:if="${type=='have'}">
                        <form th:action="@{/college/deleteCE}" class="col-lg-10">
                            <div class="col-lg-2">
                                <input type="text" hidden th:value="${college.getId()}" name="cid">
                                <input type="submit" value="删除"
                                       style="width: 150px;height: 300px;font-size: 45px;line-height: 300px;margin-left: -20px"
                                       class="btn btn-danger">
                            </div>
                            <div class="col-md-10">
                                <table class="table table-hover">
                                    <thead>
                                    <tr>
                                        <h2 style="margin-left: 50px">已有的考试科目</h2>
                                    </tr>
                                    <br>
                                    </thead>
                                    <tbody class="col-md-12 col-lg-offset-1 row">
                                    <tr th:each="its,a:${pageInfoL.list}">
                                        <td><input type="checkbox" name="ids" th:value="${its.getId()}">&nbsp;[[${its.getSubjects()}
                                            ]]
                                        </td>
                                    </tr>
                                    </tbody>
                                </table>
                            </div>
                        </form>
                        <div class="col-md-2">
                            <a th:href="@{/college/examByCoNo(id=${college.getId()})}" class="btn btn-info"
                               style="width: 170px;height: 300px;font-size: 40px;line-height: 300px;margin-left: -20px">去添加&raquo;</span></a>
                        </div>
                    </div>

                    <!--    ------------------------------------------- 添加  --------------------------------- -->
                    <div class="row" th:if="${type=='nohave'}">
                        <div class="col-lg-2">
                            <a th:href="@{/college/examByCo(id=${college.getId()})}"
                               style="width: 180px;height: 300px;font-size: 45px;line-height: 300px"
                               class="btn btn-danger">&laquo;去删除</a>
                        </div>
                        <form th:action="@{/college/addCE}" class="col-md-10">
                            <input type="text" hidden th:value="${college.getId()}" name="cid">
                            <div class="col-md-9">
                                <table class="table table-condensed">
                                    <thead>
                                    <tr>
                                        <h2 style="margin-left: 100px">未拥有的考试科目</h2>
                                    </tr>
                                    <br>
                                    </thead>
                                    <tbody class="col-md-11 col-lg-offset-2 row">
                                    <tr th:each="its,a:${pageInfoL.list}">
                                        <td><input   type="checkbox" name="ids" th:value="${its.getId()}">&nbsp;[[${its.getSubjects()}
                                            ]]
                                        </td>
                                    </tr>
                                    </tbody>

                                </table>
                            </div>
                            <div class="col-md-2">
                                <input type="submit" class="btn btn-warning" th:value="添加"
                                       style="width: 150px;height: 300px;margin-right:-150px;font-size: 40px;line-height: 300px">
                            </div>
                        </form>
                </div>
                    <div th:if="${type!='addok'&&type!='deleteok'}"  style="margin-top: -40px;" class="col-md-offset-4 col-md-8 row">
                        <a class="btn-primary" style="width: 50px"  th:href="
                             @{${#request.getRequestURI()}(id=${college.getId()},pageNum=${pageInfoL.pageNum -1})}"
                           th:if="${pageInfoL.hasPreviousPage}" aria-label="Next">
                            <span aria-hidden="true">&laquo;</span>
                        </a>
                        <a class="btn-primary" style="width: 50px"  th:href="@{${#request.getRequestURI()}(id=${college.getId()},pageNum=1)}"
                           th:if="${pageInfoL.hasPreviousPage==false}" aria-label="Next">
                            <span aria-hidden="true">&laquo;</span>
                        </a>
                        <p>
                            当前[[${pageInfoL.pageNum}]]页,总共[[${pageInfoL.pages}]]页,总[[${pageInfoL.total}]]条记录</p>
                        <a  class="btn-primary" style="width: 50px"  th:href="@{${#request.getRequestURI()}(id=${college.getId()},pageNum=${pageInfoL.pageNum +1})}"
                            th:if="${pageInfoL.hasNextPage}" aria-label="Next">
                            <span aria-hidden="true">&raquo;</span>
                        </a>
                        <a class="btn-primary" style="width: 50px"  th:href="@{${#request.getRequestURI()}(id=${college.getId()},pageNum=${pageInfoL.pages})}"
                           th:if="${pageInfoL.hasNextPage==false}" aria-label="Next">
                            <span aria-hidden="true">&raquo;</span>
                        </a>
                    </div>
            </div>
    </div>


    </main>
</div>
</div>

<script>


</script>
</body>

</html>